package com.thrc.borrow.entity;

public abstract class Page {

	private int pageIndex = 0;
	private int totleCount;
	private int pageSize = 10;
	private int startRow;

	public void setStartRow(int pageIndex, int pageSize) {

		if (pageIndex < 0 && pageSize <= 0)
			this.setStartRow(0);

		this.setStartRow(pageIndex * pageSize);

	}

	public int getStartRow() {
		return startRow;
	}

	public int getPageIndex() {
		return pageIndex;
	}

	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}

	public void setStartRow(int startRow) {
		this.startRow = startRow;
	}

	public int getTotleCount() {
		return totleCount;
	}

	public void setTotleCount(int totleCount) {
		this.totleCount = totleCount;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

}
